﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Abp.Domain.Entities.Auditing;
using FwProject.Core.Restaurant;
using FwProject.Core.TypeNumber;

namespace FwProject.Restaurant.Dto
{
    [AutoMap(typeof(LoadCar))]
    public class LoadCarInputDto
    {
        [Required]
        [Display(Name ="汽车编号")]
        public Guid Carinfoid { get; set; }

        [Display(Name = "装车单号")]
        public string CreationNumber { get; set; }

        [Display(Name = "装车日期")]
        public DateTime CreationTime { get; set; }

        [Display(Name ="出库库管编号")]
        public long? OutUserId { get; set; }

        [Display(Name = "回库库管编号")]
        public long? BackUserId { get; set; }

        [Required]
        [Display(Name ="装车状态")]
        public CarStatus CarStatus { get; set; } = CarStatus.出库审核中;

        [Display(Name = "出库审核状态")]
        public ExamineStatus ExamineStatus { get; set; } = ExamineStatus.未审核;

        [Display(Name = "回库审核状态")]
        public BackStatus BackStatus { get; set; } = BackStatus.未审核;
        [Display(Name ="盘点时间")]
        public DateTime? OverTime { get; set; }
        public List<LoadingCarInputDto> LoadingCarInputs { get; set; }

        public long? DriverUserId { get; set; }
        public long? CreatorUserId { get; set; }
    }

    public class LoadCarTypesEnterDto
    {
        public List<LoadCarTypeDetailDto> LoadCarTypeDetails { get; set; }

        public class LoadCarTypeDetailDto
        {
            /// <summary>
            /// 型号Id
            /// </summary>
            public Guid TypeNumberInfoId { get; set; }
            
            /// <summary>
            /// 装车数
            /// </summary>
            public int LoadCarCount { get; set; }

            public string TypeNumberName { get; set; }

        }
    }

}
